<?php
/**[字段默认值表模型]
 * @Author: 976123967@qq.com
 * @Date:   2014-09-24 13:24:30
 * @Last Modified by:   chen
 * @Last Modified time: 2014-09-25 00:27:58
 */
class FieldValueModel extends Model{
	protected $tableName = 'model_field_value';
	/**
	 * [add_field_value 添加字段默认值]
	 * @param [type] $data [description]
	 */
	public function add_field_value($data)
	{
		$this->add($data);
	}


	/**
	 * [delete_value 删除字段默认值]
	 * @param  [type] $fid [description]
	 * @return [type]      [description]
	 */
	public function delete_value($fid)
	{
		$this->where(array('field_fid'=>$fid))->delete();
	}

	/**
	 * [get_field_all 所有字段默认值]
	 * @param  [type] $fid [description]
	 * @return [type]      [description]
	 */
	public function get_field_all($fid)
	{
		return  $this->where(array('field_fid'=>$fid))->select();
	}
}